<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>我的帖子 - 详情</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
        }
        
        body {
            background-color: #f5f7fa;
            color: #333;
            line-height: 1.6;
            max-width: 500px;
            margin: 0 auto;
            padding: 0 10px 70px;
        }
        
        /* 顶部导航栏 */
        .header {
            background: linear-gradient(135deg, #4e54c8, #8f94fb);
            color: white;
            padding: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 4px 12px rgba(78, 84, 200, 0.2);
        }
        
        .header-title {
            font-size: 1.2rem;
            font-weight: 600;
        }
        
        .header-icon {
            color: white;
            font-size: 1.2rem;
            text-decoration: none;
        }
        
        /* 帖子状态标签 */
        .post-status {
            display: inline-block;
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 500;
            margin: 12px 0;
        }
        
        .status-active {
            background-color: rgba(78, 84, 200, 0.1);
            color: #4e54c8;
        }
        
        .status-resolved {
            background-color: rgba(46, 204, 113, 0.1);
            color: #2ecc71;
        }
        
        .status-expired {
            background-color: rgba(155, 155, 155, 0.1);
            color: #9b9b9b;
        }
        
        /* 帖子内容卡片 */
        .post-card {
            background-color: white;
            border-radius: 12px;
            padding: 18px;
            margin-bottom: 15px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        }
        
        .post-header {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
        }
        
        .post-avatar {
            width: 45px;
            height: 45px;
            border-radius: 50%;
            background-color: #f1f1f1;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #999;
            margin-right: 12px;
        }
        
        .post-author-info {
            flex: 1;
        }
        
        .post-author {
            font-weight: 600;
            margin-bottom: 3px;
        }
        
        .post-time {
            color: #888;
            font-size: 0.8rem;
        }
        
        .post-title {
            font-size: 1.2rem;
            font-weight: 600;
            margin-bottom: 12px;
            line-height: 1.4;
        }
        
        .post-content {
            color: #666;
            font-size: 0.95rem;
            line-height: 1.7;
            margin-bottom: 15px;
        }
        
        .post-image-container {
            width: 100%;
            height: 200px;
            background-color: #f1f1f1;
            border-radius: 8px;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #999;
        }
        
        .post-meta {
            display: flex;
            justify-content: space-between;
            color: #888;
            font-size: 0.9rem;
            padding-top: 10px;
            border-top: 1px solid #f1f1f1;
        }
        
        .post-meta-item {
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        /* 操作按钮 */
        .post-actions {
            display: flex;
            gap: 10px;
            margin: 15px 0;
        }
        
        .action-button {
            flex: 1;
            padding: 12px 0;
            border-radius: 8px;
            border: none;
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }
        
        .btn-edit {
            background-color: #f1f1f1;
            color: #333;
        }
        
        .btn-delete {
            background-color: #fff0f0;
            color: #ff6b6b;
        }
        
        .btn-resolve {
            background-color: rgba(46, 204, 113, 0.1);
            color: #2ecc71;
        }
        
        /* 回复区 */
        .replies-section {
            margin: 20px 0;
        }
        
        .section-title {
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 8px;
            color: #333;
        }
        
        .reply-item {
            background-color: white;
            border-radius: 12px;
            padding: 15px;
            margin-bottom: 12px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        }
        
        .reply-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 8px;
        }
        
        .reply-author {
            font-weight: 600;
            font-size: 0.95rem;
        }
        
        .reply-time {
            color: #888;
            font-size: 0.8rem;
        }
        
        .reply-content {
            color: #666;
            font-size: 0.95rem;
            margin-bottom: 10px;
        }
        
        .reply-actions {
            display: flex;
            gap: 15px;
            color: #888;
            font-size: 0.85rem;
        }
        
        .reply-action {
            display: flex;
            align-items: center;
            gap: 5px;
            cursor: pointer;
        }
        
        .reply-action.reply {
            color: #4e54c8;
        }
        
        /* 底部导航 */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background-color: white;
            display: flex;
            justify-content: space-around;
            padding: 12px 0;
            box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
            max-width: 500px;
            margin: 0 auto;
        }
        
        .nav-item {
            text-align: center;
            color: #888;
            text-decoration: none;
            font-size: 0.9rem;
        }
        
        .nav-item.active {
            color: #4e54c8;
        }
        
        .nav-item i {
            font-size: 1.2rem;
            display: block;
            margin-bottom: 4px;
        }
    </style>
</head>
<body>
    <!-- 顶部导航 -->
    <div class="header">
        <a href="my_posts.html" class="header-icon"><i class="fas fa-arrow-left"></i></a>
        <div class="header-title">我的帖子</div>
        <div class="header-icon"><i class="fas fa-ellipsis-v"></i></div>
    </div>
    
    <!-- 帖子状态 -->
    <div class="post-status status-active">
        <i class="fas fa-clock"></i> 正在进行中
    </div>
    
    <!-- 帖子内容卡片 -->
    <div class="post-card">
        <div class="post-header">
            <div class="post-avatar"><i class="fas fa-user"></i></div>
            <div class="post-author-info">
                <div class="post-author">邻居小明（我）</div>
                <div class="post-time">2024-09-20 15:30 · 求助帖</div>
            </div>
        </div>
        
        <div class="post-title">求借电钻使用，家里需要安装几个置物架</div>
        
        <div class="post-content">
            家里刚买了几个墙上置物架，需要用电钻打孔安装，有没有邻居有家用手电钻可以借用一下？大概需要使用2小时左右，我住在8号楼2单元301，用完马上归还，会小心使用的。可以的话请在下面留言或联系我，谢谢！
        </div>
        
        <div class="post-image-container">
            <i class="fas fa-image" style="font-size: 2rem;"></i>
        </div>
        
        <div class="post-meta">
            <div class="post-meta-item"><i class="fas fa-eye"></i> 28次查看</div>
            <div class="post-meta-item"><i class="fas fa-comment"></i> 3条回复</div>
            <div class="post-meta-item"><i class="fas fa-map-marker-alt"></i> 8号楼</div>
        </div>
    </div>
    
    <!-- 帖子操作按钮 -->
    <div class="post-actions">
        <button class="action-button btn-edit">
            <i class="fas fa-edit"></i> 编辑
        </button>
        <button class="action-button btn-resolve">
            <i class="fas fa-check"></i> 标记已解决
        </button>
        <button class="action-button btn-delete">
            <i class="fas fa-trash"></i> 删除
        </button>
    </div>
    
    <!-- 回复区 -->
    <div class="replies-section">
        <div class="section-title"><i class="fas fa-comments"></i> 回复 (3)</div>
        
        <div class="reply-item">
            <div class="reply-header">
                <div class="reply-author">8号楼 王邻居</div>
                <div class="reply-time">今天 14:25</div>
            </div>
            <div class="reply-content">
                我家有电钻，你什么时候需要？我今天下午都在家，可以过来取。
            </div>
            <div class="reply-actions">
                <div class="reply-action reply"><i class="fas fa-reply"></i> 回复</div>
                <div class="reply-action"><i class="fas fa-thumbs-up"></i> 感谢</div>
            </div>
        </div>
        
        <div class="reply-item">
            <div class="reply-header">
                <div class="reply-author">邻居小明（我）</div>
                <div class="reply-time">今天 14:30</div>
            </div>
            <div class="reply-content">
                @8号楼 王邻居 太好了！我下午3点左右过去取可以吗？大概使用1个半小时就还给您。
            </div>
            <div class="reply-actions">
                <div class="reply-action"><i class="fas fa-edit"></i> 编辑</div>
                <div class="reply-action"><i class="fas fa-trash"></i> 删除</div>
            </div>
        </div>
        
        <div class="reply-item">
            <div class="reply-header">
                <div class="reply-author">8号楼 王邻居</div>
                <div class="reply-time">今天 14:35</div>
            </div>
            <div class="reply-content">
                @邻居小明（我） 可以的，我在8号楼3单元402，到了给我发消息就行。
            </div>
            <div class="reply-actions">
                <div class="reply-action reply"><i class="fas fa-reply"></i> 回复</div>
                <div class="reply-action"><i class="fas fa-thumbs-up"></i> 感谢</div>
            </div>
        </div>
    </div>
    
    <!-- 底部导航 -->
    <div class="bottom-nav">
        <a href="#" class="nav-item">
            <i class="fas fa-home"></i>
            <div>首页</div>
        </a>
        <a href="#" class="nav-item">
            <i class="fas fa-comments"></i>
            <div>社区</div>
        </a>
        <a href="#" class="nav-item">
            <i class="fas fa-store"></i>
            <div>商城</div>
        </a>
        <a href="#" class="nav-item active">
            <i class="fas fa-user"></i>
            <div>我的</div>
        </a>
    </div>

    <script>
        // 帖子操作功能
        document.querySelector('.btn-edit').addEventListener('click', () => {
            alert('跳转到帖子编辑页面');
        });
        
        document.querySelector('.btn-delete').addEventListener('click', () => {
            if (confirm('确定要删除这条帖子吗？删除后不可恢复。')) {
                alert('帖子已删除');
                // 实际应用中这里会跳转到我的帖子列表页
            }
        });
        
        document.querySelector('.btn-resolve').addEventListener('click', () => {
            const statusElement = document.querySelector('.post-status');
            statusElement.classList.remove('status-active');
            statusElement.classList.add('status-resolved');
            statusElement.innerHTML = '<i class="fas fa-check"></i> 已解决';
            alert('帖子已标记为已解决');
        });
        
        // 回复操作功能
        document.querySelectorAll('.reply-action.reply').forEach(item => {
            item.addEventListener('click', function() {
                const author = this.closest('.reply-item').querySelector('.reply-author').textContent;
                alert(`回复 @${author}`);
            });
        });
        
        document.querySelectorAll('.reply-action .fa-thumbs-up').forEach(item => {
            item.parentElement.addEventListener('click', function() {
                this.classList.toggle('text-blue-500');
                alert('已表达感谢');
            });
        });
        
        document.querySelectorAll('.reply-action .fa-edit').forEach(item => {
            item.parentElement.addEventListener('click', function() {
                alert('编辑自己的回复');
            });
        });
        
        document.querySelectorAll('.reply-action .fa-trash').forEach(item => {
            item.parentElement.addEventListener('click', function() {
                if (confirm('确定要删除这条回复吗？')) {
                    this.closest('.reply-item').remove();
                    // 更新回复数量
                    const countElement = document.querySelector('.section-title');
                    const currentCount = parseInt(countElement.textContent.match(/\d+/)[0]);
                    countElement.innerHTML = `<i class="fas fa-comments"></i> 回复 (${currentCount - 1})`;
                }
            });
        });
    </script>
</body>
</html>
    